package cn.hxzy;

import org.mybatis.spring.annotation.MapperScan;
import org.redisson.Redisson;
import org.redisson.api.RedissonClient;
import org.redisson.config.Config;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.autoconfigure.security.servlet.SecurityAutoConfiguration;
import org.springframework.cloud.openfeign.EnableFeignClients;
import org.springframework.context.annotation.Bean;

//@SpringBootApplication
@SpringBootApplication(exclude = {SecurityAutoConfiguration.class})
@MapperScan("cn.hxzy.mapper")
@EnableFeignClients(basePackages = "cn.hxzy.feign.clients")
public class DriverOrderApplication {
    public static void main(String[] args) {
        SpringApplication.run(DriverOrderApplication.class, args);
    }
    @Bean
    public Redisson redisson(){
        Config config=new Config();
        config.useSingleServer()
                .setAddress("redis://192.168.9.30:6379");
        RedissonClient client = Redisson.create(config);
        return (Redisson)client;
    }


}
